package me.wsj.fengyun.utils

import android.content.Context
import android.content.Intent
import android.net.Uri
import me.wsj.fengyun.ui.activity.WebActivity

object H5Utils {

    val H5_NAME = "上海跃读网络科技有限公司"
    val H5_NO = "沪ICP备2024104037号-6A"


    val H5_WWW = "http://shyuedu.com/index.html"

    val H5_PROTECT =
        "https://bucket.lanshengcul.cn/app/public/html/shyd/UserAgreement.html"


    val H5_PRIVATE =
        "https://bucket.lanshengcul.cn/app/public/html/Windrain/Privacy.html"

    val H5_BEIAN = "https://beian.miit.gov.cn/"


    fun jump(context: Context?, url: String, inWeb: Boolean = true) {
        if (inWeb) {
            WebActivity.launch(context, url, "")
        } else {
            val uri = Uri.parse(url)
            val intent = Intent()
            intent.action = "android.intent.action.VIEW"
            intent.data = uri
            context?.startActivity(intent)
        }
    }
}